﻿using System.Collections.Generic;
using System.Runtime.Serialization;
using PeoplesJukebox.Core.Enums;
using PeoplesJukebox.Core.MediaItems.Bases;

namespace PeoplesJukebox.Core.MediaItems
{
    /// <summary>
    /// Represents an album
    /// </summary>
    [DataContract]
    public class Album : MediaItem
    {
        /// <summary>
        /// Default constructor
        /// </summary>
        public Album() { }

        /// <summary>
        /// Gets the album <see cref="Artist"/>
        /// </summary>
        public Artist Artist
        {
            get { return Container.Catalogue.GetArtist(this.ParentId); }
        }

        /// <summary>
        /// Gets the collection of album <see cref="Track"/>s
        /// </summary>
        public List<Track> Tracks
        {
            get { return Container.Catalogue.GetTracksByAlbum(this.Id); }
        }

        /// <summary>
        /// Gets the item type
        /// </summary>
        public override MediaItemType ItemType
        {
            get { return MediaItemType.Album; }
            set { }
        }
    }
}
